package com.snda.storage.service.sdk;

import java.io.File;
import java.io.InputStream;
import java.util.List;

/**
 * 
 * @author wangzijian@snda.com
 * 
 */
public interface StorageService {

	List<Bucket> listBuckets();

	ObjectListing listObjects(String bucketName);

	ObjectListing listObjects(String bucketName, Criteria criteria);

	ObjectListing listObjectsOfNextBatch(ObjectListing previousObjectListing);

	void createBucket(String bucketName);

	void createBucket(String bucketName, Location region);

	Location getBucketLocation(String bucketName);

	void deleteBucket(String bucketName);
	
	void putObject(String bucketName, InputStream inputStream, Metadata objectMetadata);
	
	void putObject(String bucketName, String key, File file);

	void putObjects(String bucketName, File directory);

	Metadata getObjectMetadata(String bucketName, String key);

	InputStream getObjectContent(String bucketName, String key);

	StorageObject getObject(String bucketName, String key);

	void deleteObject(String bucketName, String key);

}
